package com.itheima.day03.demo2;

import com.itheima.d14_bigdecimal.BigDecimalDemo;

import java.math.BigDecimal;
import java.math.RoundingMode;

public class Demo2 {
    public static void main(String[] args) {
        int max = Math.max(1, 2);
        System.out.println("max = " + max);

        double a=3.0;
        double b=10.0;

        System.out.println(0.09 + 0.01);
        BigDecimal aAmount = BigDecimal.valueOf(10.0);
        BigDecimal bigDecimal = BigDecimal.valueOf(3.0);
        BigDecimal add = aAmount.add(bigDecimal);
        System.out.println("add = " + add);

        BigDecimal divide = aAmount.divide(bigDecimal,
                2,
                RoundingMode.HALF_UP);
        System.out.println("divide = " + divide);


    }
}
